package com.ldn.common.basic.dispose.exception;

/**
 * 自定义的登录状态异常类用于未登录异常问题手动抛出问题
 *
 * @author 李大牛家的牛 (scafel@163.com)
 * @product serverless
 * @className LoginException
 * @createDate 2025/2/8 - 10:39
 * @description 自定义的登录状态异常类用于未登录异常问题手动抛出问题
 **/
public class LoginException extends RuntimeException {

    private Integer code;

    public LoginException() {
        super("未登录，请先登录");
        this.code = 201;
    }

    public LoginException(String code, String message) {
        super(message);
        this.code = Integer.valueOf(code);
    }

    public LoginException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

}
